ShalaMaster
Home
Question Bank
Blogs
Lets Connect
Service-now Interview Questions
What is difference between UI Policy and Client Script
Client Script will execute first than UI Policy.
UI Policy has condition but Client script does not (we need to write manually through code)
UI Policy has condition where we can access the fields which are not on the form but client script does not, Client script can access only the fields which are on the form.
What is import set table?
Import set table is a temporary table where we will put the data for temporary purpose and later we can move the import set data to target table using transform map.
Whenever we are pulling the data from external source, it is a standard process to get data into import set first and then validate the data using transform scripts and then transform the data into target table.
Import set table always extends import set row table.
By default import set table fields are of string type.
Import set table can be used to debug the integration where we are pulling the data from external source.
Update Set?
Update set is used to capture the customization i.e. development in servicenow.
Update set will capture the versions of every development components.
Only the table data, which has update_synch attribute =true, get captured into update set.
Only completed update set can be moved to another instance.
We should not change the update set state from completed to in progress as per standard practice.
Display business Rule?
Display business rule will run when the data is getting populated on the form from server.
Here we can use g_scratchpad global variable to send the service side information to client side script.
For display business rule, we don’t have option like update, insert, query and delete in business rule form.
Asynchronous Business rule?
Asynchronous business rule runs asynchronously, it will not hold the system to process the script.
Normally whenever we need to send lot of data to third party, we can user business rule for outbound calls.
In Asynchronous business rule, we don’t have access for previous object.
Query business rule?
Through query we are doing operation on table like pulling the records, updating the record, deleting the record.
So before query business rule, will run before doing any operation on that table.
When we click on Incident “Open”, module, this action also will trigger the before query business rule as to open all the incident in the list view, we need to query on incident table.
Record Producer?
Record producer is also one catalog item, which will be used to create a record in particular table.
We can create variables in record producer and to access that in record producer script, we need to user producer.VARIABLENAME
We can include record producer in Order guide but to do this we need find the property
sc.item.order_guide_exclusion
and remove
sc_cat_item_produce
from the Value list.
If we are having same variable name as the targeted table name in record producer, then we no need to do the mapping using script.
Order Guide?
Order guide is also one catalog item, where we can include more than one catalog item in one catalog item.
In short we can order multiple catalog item from one catalog item using order guide.
We have “Rule based” where we can add other catalog item in order guide using condition.
We have “cascaded check box” on order guide form. This will be useful when we have same variables on order guide and the include catalog items in order guide.If you ser cascaded variable check box =true, then whatever you have given the value in order guide form will get passed to catalog item form in case of same variable names.
When we order , order guide , it will create a Request then as per number of catalog items, it will create same number of RITM and can run differently using different workflows.
Catalog item?
Catalog item can be a simple catalog item, or an order guide or record producer.
Catalog item except Record Producer , we have workflow or execution plan option to process the request or order.
When we order simple catalog item or request simple catalog item it will create a Request-àRequested Item -àCatalog tasks if designed.
Catalog item are having variable to take information from user on the form.
Variable set is nothing but group of variable, we can include n number of variables in one variable set so instead of adding one by one variable for catalog item, user can use variable set.
RITM?
RITM stands for requested item.
When we order any catalog item (except record producer), it will create a Request and after request is approved, it will create a Requested Item i.e RITM.
RITM will get created depends on no of catalog items are ordered or requested.
Catalog item information will be always with RITM form not with Request form.
We need to create a work flow on requested item table if you want to run the workflow for particular catalog item.
Retroactive start in SLA?
Retroactive Start determines the SLA’s behavior.
It will come into picture when SLA is get attached after ticket creation.
If SLA is attached to the task at a point later than the task’s creation and If Retroactive Start is true, then the SLA will count time from the task’s Created On date and time.
We have option to select the field from which the new SLA will start run.
We have retroactive pause as well, it will count the previous SLA pause time and consider in the new SLA.
sys_id?
Unique Record Identifier (32-Character)
In Service now, we have sys_id for every record.
When we move the components from update set or import xml, we will get same sys_id in another instance.
Global UI Actions?
We can write a Global UI actions by creating ui actions on Global table.
Global UI actions will run on all the tables.
Choice Action?
We have choice action in transform map for field mapping.
We can use choice action for only, reference and choice fields.
Choice action will come into the picture if and only if we are getting unknow data from import set.
We have three options for choice actions.
If choice action =create and we are getting unknown value for the reference field then it will create a new record in reference table and then it will update the target table field.
If choice action=ignore and we are getting unknown value for the reference field then it will just ignore the field value while transformation
If choice action=reject and we are getting unknown value for the reference field then it will reject the whole record.
Coalesce?
Coalesce is the Boolean type of field in transform map for field mapping.
Coalesce field mapping will decide, whether to insert or update the target record.
IF we set Coalesce value =true for one field mapping, then transform map will always check the source field value while transformation into target table, if he found the source field value in target field, it will update the record other wise it will insert the record.
We can set Coalesce value =ture for more than one field mapping, in this case, transform map will consider combination of all the coalesce field values as a unique entity and trying to find the same unique combination in target table to decide insert or update operation while transformation.
How we can maintain the sys_id of records?
If we can move the records using update set, then we can maintain same sys_id in all the instances like business rule table record etc.
For user record, we need to export xml for perticualr user record and import the same xml in another instance.
getReference?
This method belongs to g_form object in client side.
This method we need to use for reference fields.
Using this method we can access reference field table fields in client script.
Mid-Server?
Whenever Service-now needs to communicate with any server or machine or tool which is in VPN, Service-now required Mid-Server.
We will use MidServer to connect with LDAP as well as MySql to pull the records.
Mid-Server need to install in Clients VPN from which target is reachable.
Service-now use ECC Queue to communicate with Mid Server.
We have Mid Server Script Includes (we called as probe),to run any command on Mid Server.
Data Policy?
Data Policy is same like UI Policy but will run while importing the data from external source into Service-now.
Whenever we are transforming the data from import set table in to Target table, Data Policy will run.
ACL?
ACL means Access Control List.
We can have ACL on Table and Fields.
Whenever we have ACL like “TableName.None” or “*.None”, it will be a table level ACL.
Whenever we have ACL like “TableName.FieldName” or “TableName.*”, it will be Field Level ACL.
To access the field, User should go through Table ACL (first) and field Level ACL as well.
To give Write and Create access, we should have read Access in ACL.
Global Business Rules?
We can write a Global Business rules by creating business rules on Global Table.
Global Business rules will run on all the Tables.
UI Action?
We can create Buttons, Links, Context Menu using UI Action.
UI action is have “Client“ check box which will decide whether the UI action will run on Server side or Client side.
Client (CheckBox)=true, UI action will run on client side, means in script we need to write client side scripting.
Client (CheckBox)=false, UI action will run on server side, means in script we need to write server side scripting.
UI action which has client check box=true can run on client side but in script we can change the client phase to server phase by using “gsftSubmit” so that we can execute the service side script as well.
UI action visibility is depends on the condition in UI action.
We need to use server side code in condition field of UI action irrespective of Client check box.
Company Separation?
For every instance the company separation plugin is activated.
To install domain separation plugin system will deactivate the company separation plugin.
We can create parent company and child company.
User who belongs to child company, will not able to see the records which are belongs to parent company this is called company separation.
OnChange Client Script
OnChange Client script will run whenever we change the particular field value.
On change client script will run on load as well.
If you don’t want to execute on change client script on load, we need to use the below script.
if (isLoading) { // isLoading will return true when form is loading
return;
}
javascript:
If you want to write the code of server side in the client side such as in default value or the refer quilifer, we need to use the “javascript: ” as below
if you want to set default value of reference field as current user:
javascript:gs.getUserID()
if you want to set the advance filter to user reference field where you need to show the list of users having first name = u_profile_name (u_profile_name is a field on the current record)
javascript:”u_first_name=”+current.u_profile_name
if you want to call the script include from filter or reference qualifier or default value
javascript:new myScriptInclude().my_refqual().